package org.tgcloud.group.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.MjGoodSku;
import org.tgcloud.group.web.controller.dto.order.GoodListDTO;
import org.tgcloud.group.web.controller.req.order.FlagshipStoreDataReq;

import java.util.List;

/**
 * @Author: zhy
 * @Created: 2025-09-01-上午10:16
 * @Description: ${description}
 */
public interface MjGoodSkuMapper extends BaseMapper<MjGoodSku> {
    int deleteByPrimaryKey(Integer id);

    int insert(MjGoodSku record);

    int insertSelective(MjGoodSku record);

    MjGoodSku selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MjGoodSku record);

    int updateByPrimaryKey(MjGoodSku record);

    int updateStatusByGoodId(@Param("goodId") Integer id, @Param("status") short status);

    List<GoodListDTO> selectListByOrderId(@Param("orderId") Integer id);

    List<MjGoodSku> selectListByGoodId(@Param("goodId") Integer goodId);

    int updatePicUrlByUrl(@Param("pUrl") List<String> pUrl);

    int updateNumByGoodIdAndSkuId(@Param("goodId") Integer goodId, @Param("skuId") Integer skuId, @Param("num") Integer num);

    int updateFlagshipStoreData(@Param("orderId") Integer orderId, @Param("skuDataList") List<FlagshipStoreDataReq.SkuData> skuDataList);
}